package com.xinsoft.service;

import com.xinsoft.common.Response;
import com.xinsoft.entity.dto.ScmPurchaseDto;
import com.xinsoft.entity.dto.ScmPurchasePageParam;
import com.xinsoft.entity.po.FmsAccountsPay;
import com.xinsoft.entity.po.ScmPurchase;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xinsoft.entity.vo.ScmPurchasePageVo;
import com.xinsoft.entity.vo.ScmPurchasePriceVo;
import com.xinsoft.entity.vo.ScmPurchaseVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 13370
* @description 针对表【scm_purchase(采购订单)】的数据库操作Service
* @createDate 2023-07-04 14:35:53
*/
public interface ScmPurchaseService extends IService<ScmPurchase> {

    Response<?> addScmPurchase(ScmPurchaseDto scmPurchaseDto);

    Response<?> editScmPurchase(ScmPurchaseDto scmPurchaseDto);

    Response<?> del(List<Long> ids);

    Response<?> findPageListByParam(ScmPurchasePageParam scmPurchasePageParam);

    List<FmsAccountsPay> getScmPayById(Integer id);

    ScmPurchaseVo getScmPurchase(@Param("id") Integer id);
    /**
     * 审批
     */
    Response<?> approved(Integer id, Integer result, Integer transferId, String desc);

    ScmPurchasePriceVo historyPrice(Integer clientId, Integer materialId);

    List<ScmPurchasePageVo> findListByParam(ScmPurchasePageParam scmPurchasePageParam);
}
